package com.mdd.front.controller;

import com.mdd.common.core.AjaxResult;
import com.mdd.front.service.IProposalService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author shenjian
 * @createTime 2023年03月04日 12:56:00
 */
@RestController
@RequestMapping("/api/proposal")
public class ProposalController {

    @Resource
    IProposalService iProposalService;

    /**
     * 添加投诉建议
     *
     * @author shenjian
     */
    @GetMapping("/add")
    public AjaxResult<?> add(@Validated @RequestParam("content") String content) {
        iProposalService.add(content);
        return AjaxResult.success();
    }
}
